3.7.70 \(\int \frac {\sqrt {\tan (c+d x)}}{\sqrt {-3-2 \tan (c+d x)}} \, dx\) [670]

Optimal. Leaf size=95 \[ \frac {i \text {ArcTan}\left (\frac {\sqrt {2-3 i} \sqrt {\tan (c+d x)}}{\sqrt {-3-2 \tan (c+d x)}}\right )}{\sqrt {2-3 i} d}-\frac {i \text {ArcTan}\left (\frac {\sqrt {2+3 i} \sqrt {\tan (c+d x)}}{\sqrt {-3-2 \tan (c+d x)}}\right )}{\sqrt {2+3 i} d} \]

[Out]

I*arctan((2-3*I)^(1/2)*tan(d*x+c)^(1/2)/(-3-2*tan(d*x+c))^(1/2))/d/(2-3*I)^(1/2)-I*arctan((2+3*I)^(1/2)*tan(d*
x+c)^(1/2)/(-3-2*tan(d*x+c))^(1/2))/d/(2+3*I)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3656, 924, 95, 211} \begin {gather*} \frac {i \text {ArcTan}\left (\frac {\sqrt {2-3 i} \sqrt {\tan (c+d x)}}{\sqrt {-2 \tan (c+d x)-3}}\right )}{\sqrt {2-3 i} d}-\frac {i \text {ArcTan}\left (\frac {\sqrt {2+3 i} \sqrt {\tan (c+d x)}}{\sqrt {-2 \tan (c+d x)-3}}\right )}{\sqrt {2+3 i} d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[Tan[c + d*x]]/Sqrt[-3 - 2*Tan[c + d*x]],x]

[Out]

(I*ArcTan[(Sqrt[2 - 3*I]*Sqrt[Tan[c + d*x]])/Sqrt[-3 - 2*Tan[c + d*x]]])/(Sqrt[2 - 3*I]*d) - (I*ArcTan[(Sqrt[2
 + 3*I]*Sqrt[Tan[c + d*x]])/Sqrt[-3 - 2*Tan[c + d*x]]])/(Sqrt[2 + 3*I]*d)

Rule 95

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 924

Int[((d_.) + (e_.)*(x_))^(m_)/(Sqrt[(f_.) + (g_.)*(x_)]*((a_.) + (c_.)*(x_)^2)), x_Symbol] :> Int[ExpandIntegr
and[1/(Sqrt[d + e*x]*Sqrt[f + g*x]), (d + e*x)^(m + 1/2)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] &
& NeQ[c*d^2 + a*e^2, 0] && IGtQ[m + 1/2, 0]

Rule 3656

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Wit
h[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + b*ff*x)^m*((c + d*ff*x)^n/(1 + ff^2*x^2)), x]
, x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] &&
NeQ[c^2 + d^2, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {\tan (c+d x)}}{\sqrt {-3-2 \tan (c+d x)}} \, dx &=\frac {\text {Subst}\left (\int \frac {\sqrt {x}}{\sqrt {-3-2 x} \left (1+x^2\right )} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {1}{2 \sqrt {-3-2 x} (i-x) \sqrt {x}}+\frac {1}{2 \sqrt {-3-2 x} \sqrt {x} (i+x)}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \frac {1}{\sqrt {-3-2 x} (i-x) \sqrt {x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {\text {Subst}\left (\int \frac {1}{\sqrt {-3-2 x} \sqrt {x} (i+x)} \, dx,x,\tan (c+d x)\right )}{2 d}\\ &=\frac {\text {Subst}\left (\int \frac {1}{i-(3-2 i) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {-3-2 \tan (c+d x)}}\right )}{d}-\frac {\text {Subst}\left (\int \frac {1}{i+(3+2 i) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {-3-2 \tan (c+d x)}}\right )}{d}\\ &=\frac {i \tan ^{-1}\left (\frac {\sqrt {2-3 i} \sqrt {\tan (c+d x)}}{\sqrt {-3-2 \tan (c+d x)}}\right )}{\sqrt {2-3 i} d}-\frac {i \tan ^{-1}\left (\frac {\sqrt {2+3 i} \sqrt {\tan (c+d x)}}{\sqrt {-3-2 \tan (c+d x)}}\right )}{\sqrt {2+3 i} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 103, normalized size = 1.08 \begin {gather*} -\frac {i \left (\sqrt {2+3 i} \text {ArcTan}\left (\frac {\sqrt {\frac {2}{13}+\frac {3 i}{13}} \sqrt {-3-2 \tan (c+d x)}}{\sqrt {\tan (c+d x)}}\right )+\sqrt {-2+3 i} \tanh ^{-1}\left (\frac {\sqrt {-\frac {2}{13}+\frac {3 i}{13}} \sqrt {-3-2 \tan (c+d x)}}{\sqrt {\tan (c+d x)}}\right )\right )}{\sqrt {13} d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Tan[c + d*x]]/Sqrt[-3 - 2*Tan[c + d*x]],x]

[Out]

((-I)*(Sqrt[2 + 3*I]*ArcTan[(Sqrt[2/13 + (3*I)/13]*Sqrt[-3 - 2*Tan[c + d*x]])/Sqrt[Tan[c + d*x]]] + Sqrt[-2 +
3*I]*ArcTanh[(Sqrt[-2/13 + (3*I)/13]*Sqrt[-3 - 2*Tan[c + d*x]])/Sqrt[Tan[c + d*x]]]))/(Sqrt[13]*d)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(433\) vs. \(2(77)=154\).
time = 0.70, size = 434, normalized size = 4.57

method result size
derivativedivides \(\frac {3 \sqrt {-3-2 \tan \left (d x +c \right )}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}\, \left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right ) \left (\sqrt {13}\, \sqrt {2 \sqrt {13}+4}\, \arctanh \left (\frac {\left (2+\sqrt {13}\right ) \left (\sqrt {13}+2-3 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right ) \sqrt {13}}{351 \sqrt {-4+2 \sqrt {13}}\, \left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right ) \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}}\right ) \sqrt {-4+2 \sqrt {13}}-2 \sqrt {2 \sqrt {13}+4}\, \arctanh \left (\frac {\left (2+\sqrt {13}\right ) \left (\sqrt {13}+2-3 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right ) \sqrt {13}}{351 \sqrt {-4+2 \sqrt {13}}\, \left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right ) \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}}\right ) \sqrt {-4+2 \sqrt {13}}+8 \arctan \left (\frac {6 \sqrt {13}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+52}}\right ) \sqrt {13}-34 \arctan \left (\frac {6 \sqrt {13}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+52}}\right )\right )}{2 d \sqrt {\tan \left (d x +c \right )}\, \sqrt {2 \sqrt {13}+4}\, \left (3+2 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right )}\) \(434\)
default \(\frac {3 \sqrt {-3-2 \tan \left (d x +c \right )}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}\, \left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right ) \left (\sqrt {13}\, \sqrt {2 \sqrt {13}+4}\, \arctanh \left (\frac {\left (2+\sqrt {13}\right ) \left (\sqrt {13}+2-3 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right ) \sqrt {13}}{351 \sqrt {-4+2 \sqrt {13}}\, \left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right ) \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}}\right ) \sqrt {-4+2 \sqrt {13}}-2 \sqrt {2 \sqrt {13}+4}\, \arctanh \left (\frac {\left (2+\sqrt {13}\right ) \left (\sqrt {13}+2-3 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right ) \sqrt {13}}{351 \sqrt {-4+2 \sqrt {13}}\, \left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right ) \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}}\right ) \sqrt {-4+2 \sqrt {13}}+8 \arctan \left (\frac {6 \sqrt {13}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+52}}\right ) \sqrt {13}-34 \arctan \left (\frac {6 \sqrt {13}\, \sqrt {-\frac {\tan \left (d x +c \right ) \left (3+2 \tan \left (d x +c \right )\right )}{\left (\sqrt {13}-2+3 \tan \left (d x +c \right )\right )^{2}}}}{\sqrt {26 \sqrt {13}+52}}\right )\right )}{2 d \sqrt {\tan \left (d x +c \right )}\, \sqrt {2 \sqrt {13}+4}\, \left (3+2 \tan \left (d x +c \right )\right ) \left (17 \sqrt {13}-52\right )}\) \(434\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^(1/2)/(-3-2*tan(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

3/2/d*(-3-2*tan(d*x+c))^(1/2)*(-tan(d*x+c)*(3+2*tan(d*x+c))/(13^(1/2)-2+3*tan(d*x+c))^2)^(1/2)*(13^(1/2)-2+3*t
an(d*x+c))*(13^(1/2)*(2*13^(1/2)+4)^(1/2)*arctanh(1/351*(2+13^(1/2))*(13^(1/2)+2-3*tan(d*x+c))*(17*13^(1/2)-52
)/(-4+2*13^(1/2))^(1/2)/(13^(1/2)-2+3*tan(d*x+c))*13^(1/2)/(-tan(d*x+c)*(3+2*tan(d*x+c))/(13^(1/2)-2+3*tan(d*x
+c))^2)^(1/2))*(-4+2*13^(1/2))^(1/2)-2*(2*13^(1/2)+4)^(1/2)*arctanh(1/351*(2+13^(1/2))*(13^(1/2)+2-3*tan(d*x+c
))*(17*13^(1/2)-52)/(-4+2*13^(1/2))^(1/2)/(13^(1/2)-2+3*tan(d*x+c))*13^(1/2)/(-tan(d*x+c)*(3+2*tan(d*x+c))/(13
^(1/2)-2+3*tan(d*x+c))^2)^(1/2))*(-4+2*13^(1/2))^(1/2)+8*arctan(6*13^(1/2)*(-tan(d*x+c)*(3+2*tan(d*x+c))/(13^(
1/2)-2+3*tan(d*x+c))^2)^(1/2)/(26*13^(1/2)+52)^(1/2))*13^(1/2)-34*arctan(6*13^(1/2)*(-tan(d*x+c)*(3+2*tan(d*x+
c))/(13^(1/2)-2+3*tan(d*x+c))^2)^(1/2)/(26*13^(1/2)+52)^(1/2)))/tan(d*x+c)^(1/2)/(2*13^(1/2)+4)^(1/2)/(3+2*tan
(d*x+c))/(17*13^(1/2)-52)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^(1/2)/(-3-2*tan(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(tan(d*x + c))/sqrt(-2*tan(d*x + c) - 3), x)

________________________________________________________________________________________

Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^(1/2)/(-3-2*tan(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {\tan {\left (c + d x \right )}}}{\sqrt {- 2 \tan {\left (c + d x \right )} - 3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**(1/2)/(-3-2*tan(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(tan(c + d*x))/sqrt(-2*tan(c + d*x) - 3), x)

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 209 vs. \(2 (67) = 134\).
time = 0.85, size = 209, normalized size = 2.20 \begin {gather*} -\frac {\sqrt {2} {\left (-i \, {\left (\sqrt {2} \sqrt {-\tan \left (d x + c\right )} - \sqrt {-2 \, \tan \left (d x + c\right ) - 3}\right )}^{4} - 6 i \, {\left (\sqrt {2} \sqrt {-\tan \left (d x + c\right )} - \sqrt {-2 \, \tan \left (d x + c\right ) - 3}\right )}^{2} - 9 i\right )} \log \left ({\left (\sqrt {2} \sqrt {-\tan \left (d x + c\right )} - \sqrt {-2 \, \tan \left (d x + c\right ) - 3}\right )}^{8} + 12 \, {\left (\sqrt {2} \sqrt {-\tan \left (d x + c\right )} - \sqrt {-2 \, \tan \left (d x + c\right ) - 3}\right )}^{6} + 118 \, {\left (\sqrt {2} \sqrt {-\tan \left (d x + c\right )} - \sqrt {-2 \, \tan \left (d x + c\right ) - 3}\right )}^{4} + 108 \, {\left (\sqrt {2} \sqrt {-\tan \left (d x + c\right )} - \sqrt {-2 \, \tan \left (d x + c\right ) - 3}\right )}^{2} + 81\right )}{27 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^(1/2)/(-3-2*tan(d*x+c))^(1/2),x, algorithm="giac")

[Out]

-1/27*sqrt(2)*(-I*(sqrt(2)*sqrt(-tan(d*x + c)) - sqrt(-2*tan(d*x + c) - 3))^4 - 6*I*(sqrt(2)*sqrt(-tan(d*x + c
)) - sqrt(-2*tan(d*x + c) - 3))^2 - 9*I)*log((sqrt(2)*sqrt(-tan(d*x + c)) - sqrt(-2*tan(d*x + c) - 3))^8 + 12*
(sqrt(2)*sqrt(-tan(d*x + c)) - sqrt(-2*tan(d*x + c) - 3))^6 + 118*(sqrt(2)*sqrt(-tan(d*x + c)) - sqrt(-2*tan(d
*x + c) - 3))^4 + 108*(sqrt(2)*sqrt(-tan(d*x + c)) - sqrt(-2*tan(d*x + c) - 3))^2 + 81)/d

________________________________________________________________________________________

Mupad [B]
time = 5.70, size = 189, normalized size = 1.99 \begin {gather*} -\mathrm {atan}\left (\frac {8\,d\,\sqrt {\frac {\frac {1}{26}+\frac {3}{52}{}\mathrm {i}}{d^2}}\,\left (-\sqrt {\mathrm {tan}\left (c+d\,x\right )}+\frac {\sqrt {2}\,\sqrt {3}\,1{}\mathrm {i}}{2}\right )}{\sqrt {-2\,\mathrm {tan}\left (c+d\,x\right )-3}\,\left (\frac {2\,{\left (-\sqrt {\mathrm {tan}\left (c+d\,x\right )}+\frac {\sqrt {2}\,\sqrt {3}\,1{}\mathrm {i}}{2}\right )}^2}{2\,\mathrm {tan}\left (c+d\,x\right )+3}+1\right )}\right )\,\sqrt {\frac {\frac {1}{26}+\frac {3}{52}{}\mathrm {i}}{d^2}}\,2{}\mathrm {i}+\mathrm {atan}\left (\frac {8\,d\,\sqrt {\frac {\frac {1}{26}-\frac {3}{52}{}\mathrm {i}}{d^2}}\,\left (-\sqrt {\mathrm {tan}\left (c+d\,x\right )}+\frac {\sqrt {6}\,1{}\mathrm {i}}{2}\right )}{\sqrt {-2\,\mathrm {tan}\left (c+d\,x\right )-3}\,\left (\frac {2\,{\left (-\sqrt {\mathrm {tan}\left (c+d\,x\right )}+\frac {\sqrt {6}\,1{}\mathrm {i}}{2}\right )}^2}{2\,\mathrm {tan}\left (c+d\,x\right )+3}+1\right )}\right )\,\sqrt {\frac {\frac {1}{26}-\frac {3}{52}{}\mathrm {i}}{d^2}}\,2{}\mathrm {i} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^(1/2)/(- 2*tan(c + d*x) - 3)^(1/2),x)

[Out]

atan((8*d*((1/26 - 3i/52)/d^2)^(1/2)*((6^(1/2)*1i)/2 - tan(c + d*x)^(1/2)))/((- 2*tan(c + d*x) - 3)^(1/2)*((2*
((6^(1/2)*1i)/2 - tan(c + d*x)^(1/2))^2)/(2*tan(c + d*x) + 3) + 1)))*((1/26 - 3i/52)/d^2)^(1/2)*2i - atan((8*d
*((1/26 + 3i/52)/d^2)^(1/2)*((2^(1/2)*3^(1/2)*1i)/2 - tan(c + d*x)^(1/2)))/((- 2*tan(c + d*x) - 3)^(1/2)*((2*(
(2^(1/2)*3^(1/2)*1i)/2 - tan(c + d*x)^(1/2))^2)/(2*tan(c + d*x) + 3) + 1)))*((1/26 + 3i/52)/d^2)^(1/2)*2i

________________________________________________________________________________________